<ul class="breadcrumb">
  <li><a href="<lisp>(ob:path-to-root)</lisp>/index.html"><lisp>(ob:gettext :home)</lisp></a> <span class="divider">/</span></li>
  <lisp>
(cond
 ;; Static page or post
 ((boundp 'POST)
  (let ((path (when (ob:post-filepath POST)
		(cdr (split-string (ob:post-filepath POST) "/")))))

    (loop for p in (if (ob:greater (length path) 1) (cons (ob:post-category POST) path) path)
	  with prev = (ob:path-to-root)
	  do (progn
	       (setf prev (format "%s/%s" prev (if (ob:category-p p) (ob:category-safe p) p)))
	       (insert
		(format
		 "<li><a href=\"%s/index.html\">%s</a> <span class=\"divider\">/</span></li>"
		 prev (if (ob:category-p p) (ob:category-name p) p))))))
  (unless (and
	   (string= "index.html" (ob:post-htmlfile POST))
	   (string= "." (ob:post-path-to-root POST)))
    (insert
     (format "<li>%s</li>"
	     (ob:post-title POST)))))

 ;; archives
 ((and (boundp 'MONTH) (boundp 'YEAR) (boundp 'CATEGORY))
  (insert "<li><a href=\"../../../archives.html\">Archives</a> <span class=\"divider\">/</span></li>")
  (insert (format "<li><a href=\"../../index.html\">%s</a> <span class=\"divider\">/</span></li>"  (ob:category-name CATEGORY)))
  (insert (format "<li><a href=\"../index.html\">%s</a> <span class=\"divider\">/</span></li>"  YEAR))
  (insert (format "<li>%.2d</li>" MONTH)))

 ((and (boundp 'YEAR) (boundp 'CATEGORY))
  (insert "<li><a href=\"../../archives.html\">Archives</a> <span class=\"divider\">/</span></li>")
  (insert (format "<li><a href=\"../index.html\">%s</a> <span class=\"divider\">/</span></li>"  (ob:category-name CATEGORY)))
  (insert (format "<li>%s</li>" YEAR)))

 ((boundp 'CATEGORY)
  (insert "<li><a href=\"../archives.html\">Archives</a> <span class=\"divider\">/</span></li>")
  (insert (format "<li>%s</li>" (ob:category-name CATEGORY))))

 ((and
   ;;(boundp 'template)
   (string= "blog_archives.html" template))
  (insert (format "<li>Archives</li>")))


 ;; Tags
 ((boundp 'TAG)
  (insert "<li><a href=\"index.html\">Tags</a> <span class=\"divider\">/</span></li>")
  (insert (format "<li>%s</li>" (ob:tags-name TAG))))

  ((and
    ;;(boundp 'template)
    (string= "blog_tags.html" template))
  (insert (format "<li>Tags</li>")))

  ((boundp 'BREADCRUMB)
   (insert (format "<li>%s</li>" BREADCRUMB))))


  </lisp>
  </ul>
